package top.gelonggld.model;

/**
 * Created by gelon on 2017/5/27.
 * 注释
 */
public class Annotation extends BaseParagraph{

    String annotationInfo;


    public Annotation(int start, int end, String paragraphStr, int type) {
        super(start, end, paragraphStr, type);
    }

    @Override
    public void onPushDate(String paragraphStr) {
        annotationInfo = annotationFrom(paragraphStr);
    }

    @Override
    public void initDate() {

    }

    private String annotationFrom(String proStr) {
        return proStr.substring(3, proStr.length() ).replace("*","").replace("\r\n"," ").replace("/","").trim();
    }

    public String getAnnotationInfo() {
        return annotationInfo;
    }

    public Annotation setAnnotationInfo(String annotationInfo) {
        this.annotationInfo = annotationInfo;
        return this;
    }
}
